package com.hawk.eye.client.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;

/**
 * @className: HawkEyeProperties
 * @description:
 * @author: salad
 * @date: 2023/10/23
 **/
@Data
@ConfigurationProperties(prefix = HawkEyeProperties.PREFIX)
public class HawkEyeProperties {

    public final static String PREFIX = "hawk-eye.client";

    /**
     * 是否开启，开启后才会进行告警
     */
    private Boolean enabled = true;

    /**
     * 客户端的密码，配置的和HawkEyeServer不一致会导致授权失败
     */
    private String token;

    /**
     * HawkEyeServer的地址
     */
    private String hawkEyeServerAddress = "http://127.0.0.1:8899";

    /**
     * 定时连接HawkEyeServer的周期
     */
    private Long connectTaskDelayTime = 5L;

    /**
     * 定时周期的单位
     */
    private TimeUnit delayTimeUnit = TimeUnit.MINUTES;

    /**
     * 主启动类所在的包路径
     * 比如：com.idea.relax.log.Application，则包路径为；com.idea.relax.log
     * 如果不配置，在服务启动时将会自动计算
     */
    private String appPackagePrefix;

}
